* Nested DO loop; data nested; do Year=1 to 5; Capital+5000; do Quarter=1 to 4; Capital+(Capital*(.045/4)); output; end; output; end; run; proc print data=nested noobs; format Capital dollar14.2; run; *alternative method not showing the quarter variable; data nested(drop=Quarter); do Year=1 to 5; Capital+5000; do Quarter=1 to 4; Capital+(Capital*(.045/4)); end; output; end; run; proc print data=nested noobs; var year quarter capital; format Capital dollar14.2; run;